package com.qf.utils;

import com.qf.dto.ApiResult;
import com.qf.enums.ApiEnum;

public class R {

    public static ApiResult ok(Object data){
        return new ApiResult(ApiEnum.SUCCESS,data);
    }

    public static ApiResult ok(){
        return new ApiResult(ApiEnum.SUCCESS);
    }

    public static ApiResult fail(){
        return new ApiResult(ApiEnum.FAIL);
    }

    public static ApiResult fail(Object data){
        return new ApiResult(ApiEnum.FAIL,data);
    }

    public  static ApiResult fail(String message){
        return new ApiResult(message);
    }
}
